package com.hhxy.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.hhxy.service.CategoryService;
import com.hhxy.utils.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ghp
 * @date 2023/4/25
 * @title
 * @description
 */
@Api(tags = {"前台接口", "分类管理"})
@ApiSupport(author = "ghp", order = 1)
@RestController
@RequestMapping("/category")
public class FeCategoryController {

    @Resource
    private CategoryService categoryService;

    @GetMapping("/getCategoryList")
    @ApiOperation(value = "查询已发布文章的分类")
    @ApiOperationSupport(author = "ghp", order = 1)
    public ResponseResult getCategoryList(){
        return categoryService.getCategoryList();
    }
}
